#pragma once
#include <iostream>
#include <string>
#include <vector>
#include <functional>

using task_t = std::function<void()>;

void Download()
{
    std::cout<<"我是一个下载任务"<<std::endl;
}
void Mysql()
{
    std::cout<<"我是一个Mysql任务"<<std::endl;
}
void Sync()
{
    std::cout<<"我是一个数据刷新同步任务"<<std::endl;
}
void Log()
{
    std::cout<<"我是一个日志任务"<<std::endl;
}

//把这些任务用数组组织起来
std::vector<task_t> tasks;
class Init
{
public:
    Init()
    {
        tasks.push_back(Download);
        tasks.push_back(Mysql);
        tasks.push_back(Sync);
        tasks.push_back(Log);

    }
};
Init ginit;